package com.sunyard.dal.mapper;

import com.sunyard.dal.dto.OtherParamCopyDTO;
import com.sunyard.dal.entity.OtherParamCopy;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author xin.qi
 * @Classname OtherParamCopyMapper
 * @Description TODO 其他参数设置审核数据交互层
 * @Date 2020/1/10 17:44
 */
public interface OtherParamCopyMapper {

    /**
     * @param confKey
     * @return com.sunyard.dal.entity.OtherParamCopy
     * @Author xin.qi
     * @Description 查询在审核中记录
     * @Date 2020/1/10 18:17
     * @Param
     */
    OtherParamCopy countAuditingByotherParamKey(String confKey);

    /**
     * @param otherParamCopy
     * @return int
     * @Author xin.qi
     * @Description 查询上一次审核的序列号
     * @Date 2020/1/10 19:28
     * @Param
     */
    int queryByOtherParamKey(OtherParamCopy otherParamCopy);

    /**
     * @return java.util.List<com.sunyard.dal.entity.OtherParamCopy>
     * @Author xin.qi
     * @Description 全表查询
     * @Date 2020/1/10 18:28
     * @Param
     */
    List<OtherParamCopy> query(String confKey);

    /**
     * @param otherParamCopy
     * @return int
     * @Author xin.qi
     * @Description 插入审核表
     * @Date 2020/1/10 18:55
     * @Param
     */
    int insert(OtherParamCopy otherParamCopy);

    /**
     * @param otherParamCopy
     * @return java.util.List<com.sunyard.dal.dto.OtherParamCopyDTO>
     * @Author xin.qi
     * @Description 分页查询参数修改审核记录
     * @Date 2020/1/10 19:10
     * @Param
     */
    List<OtherParamCopyDTO> queryByPage(OtherParamCopy otherParamCopy);

    /**
     * @param auditId
     * @return com.sunyard.dal.entity.OtherParamCopy
     * @Author xin.qi
     * @Description 通过审核id查询审核记录
     * @Date 2020/1/10 19:19
     * @Param
     */
    OtherParamCopy queryByAuditId(String auditId);

    /**
     * @param otherParamCopy
     * @return void
     * @Author xin.qi
     * @Description 修改审核记录表
     * @Date 2020/1/10 19:21
     * @Param
     */
    void updateByAudit(OtherParamCopy otherParamCopy);

    /**
     * @param otherParamCopyNew
     * @return int
     * @Author xin.qi
     * @Description 查询上一个审核成功的对应参数的审核序号
     * @Date 2020/1/10 19:35
     * @Param
     */
    int queryLastSn(OtherParamCopy otherParamCopy);

    /**
     * @param confKey
     * @param sn
     * @return com.sunyard.dal.entity.OtherParamCopy
     * @Author xin.qi
     * @Description 根据参数键与审核序号查询审核记录
     * @Date 2020/1/10 19:40
     * @Param
     */
    OtherParamCopy queryByCardbinIdAndSn(@Param("confKey") String confKey, @Param("auditSn") int sn);

    int countByConfKey(String confKey);
}
